<div class="section">
	<div class="block">
		<?php
		$form = $this->beginWidget('GxActiveForm', array(
			'action' => Yii::app()->createUrl($this->route),
			'method' => 'get',
		));
		?>
		<table class="table">
			<tr>
				<th scope="row" class="align-right"><?php echo $form->label($user, 'name'); ?></th>
				<td><?php echo $form->textField($user, 'name', array('style' => 'width: 98%')); ?></td>
				<th scope="row" class="align-right"><?php echo $form->label($user, 'username'); ?></th>
				<td><?php echo $form->textField($user, 'username', array('style' => 'width: 98%')); ?></td>
				<th scope="row" class="align-right"><?php echo $form->label($user, 'mobile'); ?></th>
				<td><?php echo $form->textField($user, 'mobile'); ?></td>
			</tr>
			<tr>
				<th scope="row" class="align-right"><?php echo $form->label($user, 'designation'); ?></th>
				<td><?php echo $form->dropDownList($user, 'designation_id', Designation::model()->getActiveDesignationsListData(), array('prompt' => '', 'style' => 'width: 100%')); ?></td>
				<th scope="row" class="align-right"><?php echo $form->label($user, 'auth_item_name', array('label' => 'Roles')); ?></th>
				<td><?php echo $form->dropDownList($user, 'auth_item_name', UserAuthItem::getRolesListData(Yii::app()->user->model->agency_id), array('prompt' => '', 'style' => 'width: 100%')); ?></td>
				<th scope="row" class="align-right"><?php echo $form->label($user, 'last_login_option', array('label' => 'Last Login')); ?></th>
				<td><?php echo $form->dropDownList($user, 'last_login_option', User::getLastLoginListData(), array('prompt' => "")); ?></td>
			</tr>
			<tr>
				<th scope="row" class="align-right valign-top"><?php echo $form->label($user, 'upline_user_id'); ?></th>
				<td>
					<?php
					$this->widget('common.widgets.PsSelect2.PsSelect2', array(
						'model' => $user,
						'attribute' => 'upline_user_id',
						'data' => CMap::mergeArray(array('none' => 'No Uplines'), Yii::app()->user->model->agency->getUsersListData()),
						'htmlOptions' => array(
							'prompt' => '',
							'multiple' => false,
							'style' => 'width:220px;',
						),
						'options' => array(
							'allow_single_deselect' => true
						)
					));
					?>
					<div>
						<?php echo $form->checkBox($user, 'include_indirect_uplines', array('uncheckValue' => 0)); ?>
						<?php echo $form->labelEx($user, 'include_indirect_uplines'); ?>
					</div>
				</td>
				<td colspan='4'>

				</td>
			</tr>
		</table>
		<div class="row buttons">
			<?php echo GxHtml::submitButton(Yii::t('app', 'Search'), array('class' => 'green', 'name' => 'action')); ?>
			<?php echo GxHtml::submitButton(Yii::t('app', 'Clear Filters'), array('class' => '', 'name' => 'action')); ?>
		</div>
		<?php $this->endWidget(); ?>
	</div>
</div><!-- search-form -->
